class emiconfig::domadisk {

  class{"dpm::disknode":
    headnode_fqdn                 => "dpmtest.ihep.ac.cn",
    localdomain                   => 'ihep.ac.cn',
    disk_nodes                    => ['dpmds05.ihep.ac.cn',],
    token_password                => 'kwpoMyvcusgdbyyws6gfcxhntkLoh8jilwivnivel',
    xrootd_sharedkey              => 'DXjgDTkK55fnyFr8gW1RcYv0pV7vkcWmZyHr9f4aoc8=',
    configure_dpm_xrootd_checksum => true,
    volist                        => ["dteam", "ops"],
    #configure_star               => true, # enable apel accounting
    configure_dome                => true,
    configure_domeadapter         => true,
    #configure_legacy             => false,
    dpmmgr_uid                    => 500,
    dpmmgr_gid                    => 500,
    gridftp_redirect              => true,
    host_dn                       =>  "/C=CN/O=HEP/O=IHEP/OU=CC/CN=${::fqdn}",
    mountpoints                   => ['/storage/disk01',],
    groupmap => {
      "vomss://voms2.hellasgrid.gr:8443/voms/dteam?/dteam/Role=lcgadmin"   => "dteam",
      "vomss://voms2.hellasgrid.gr:8443/voms/dteam?/dteam/Role=production" => "dteam",
      "vomss://voms2.hellasgrid.gr:8443/voms/dteam?/dteam"                 => "dteam",
      "vomss://voms2.cern.ch:8443/voms/ops?/ops"                           => "ops",
      "vomss://lcg-voms2.cern.ch:8443/voms/ops?/ops"                           => "ops",
    },
  }

  class { 'limits':
    purge_limits_d_dir => false,
  }
   limits::limits { 'user_nofile':
    ensure     => present,
    user       => '*',
    limit_type => 'nofile',
    soft       => '65000',
    hard       => '65000',
  }
   limits::limits { 'user_nproc':
    ensure     => present,
    user       => '*',
    limit_type => 'nproc',
    soft       => '65000',
    hard       => '65000',
  }
}
